#ifndef SELECTFILENAME_H
#define SELECTFILENAME_H

#include <QLineEdit>

class QFileSystemModel;
class SelectFileName : public QLineEdit
{
    Q_OBJECT
public:
    explicit SelectFileName(QWidget *parent = 0);
    void setBasePath(const QString & path);
public:
    bool exists();
    void setCheckExisting(bool existing);
    void setExtension(const QString &);
    QString fullFileName();
    void normFileName();
    void setDirRequest(bool isdir);
    void setBaseName(const QString& name);
private slots:
    void onTextChanged(const QString &);
    void onEditingFinished();
private:
    QString _path;
    QPalette _normal;
    bool _checkExisting;
    bool _isDir;
    QString _extension;
};

#endif // SELECTFILENAME_H
